package com.itheima02.day03;

import java.util.Scanner;

/**
 * @author 刘全
 * @date 2021/7/18
 */
public class test03 {
    public static void main(String[] args) {
        say(name -> System.out.println(name+",你是伞兵"));
    }
    public static void say(ISpeak iSpeak){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入名字:");
        String s = sc.nextLine();
        iSpeak.sayHello(s);
    }
}
interface ISpeak{
    void sayHello(String name);
}